<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="{% url 'booktest:show' '123123' %}">显示</a>
<hr>
<!--{{ hero.showname }}-->
奇数行显示为红色，偶数行显示为蓝色
<hr>
<ul>
{% for hero in list %}
    {% if forloop.counter|divisibleby:"2" %}
        <li style="color: blue">{{forloop.counter}}:{{hero.showname}}</li>
    {% else %}
        <li style="color: red">{{forloop.counter}}:{{hero.showname}}</li>
    {% endif %}
{%empty%}
    <li>啥也没找到</li>
{% endfor %}

</ul>

</body>
</html>